package net.lzzy.gsonandjson;

import org.apache.spark.SparkConf;
import org.apache.spark.api.java.JavaRDD;
import org.apache.spark.api.java.JavaSparkContext;

public class SaveAsTextFileTestHdfsDemo {

    public static void main(String[] args) {
        SparkConf sparkConf = new SparkConf().setAppName("SaveAsTextFileTest").setMaster("local");
        JavaSparkContext javaSparkContext = new JavaSparkContext(sparkConf);
        JavaRDD<String> stringJavaRDD1 = javaSparkContext.textFile("out/artifacts/Spark_Exercise_jar/Spark-Exercise.jar");
        stringJavaRDD1.saveAsTextFile("hdfs://192.168.17.3:9000/Spark-Exercise.jar");

    }
}
